<?php
use \Psr\Http\Message\ServerRequestInterface as Request;
use \Psr\Http\Message\ResponseInterface as Response;
session_start(); 
define('ROOT_PATH'  , __DIR__.'/../../');
define('VENDOR_PATH', __DIR__.'/../../vendor/');
define('APP_PATH'   , __DIR__.'/../../App/');
define('PUBLIC_PATH', __DIR__.'/../../public/');

require VENDOR_PATH.'autoload.php';
require APP_PATH.'Config/config.php';
//初始化应用程序对象
$app=new \Slim\App($config);
//获取容器对象
$container=$app->getContainer();
//加载数据库配置
require APP_PATH.'Config/database.php';

//加载容器配置
require APP_PATH.'Config/container.php';
//加载路由配置
require APP_PATH.'routes.php';

return $app;